package com.wushi.lenovo.asia5b.app_model.other;

import android.graphics.Bitmap;
import android.text.TextUtils;

import com.mvp.base.model.BaseModel;

/**
 * Created by zhangyuncai on 2019/4/3.
 */
public class ShareBean extends BaseModel {
    public static final int TXET = 10;
    public static final int IMG = 12;
    public static final int GOODS = 14;
    public int shareType = GOODS;//分享类型
    private String shareUrl;
    private String title;
    private String desc;
    private String imgUrl;
    private Bitmap bitmap;
    private String imgFilePath;


    public ShareBean() {
    }

    public ShareBean(String shareUrl, String title, String desc, String imgUrl) {
        this.shareUrl = shareUrl;
        this.title = title;
        this.desc = desc;
        this.imgUrl = imgUrl;
    }

    public Bitmap getBitmap() {
        return bitmap;
    }

    public void setBitmap(Bitmap bitmap) {
        this.bitmap = bitmap;
    }

    public String getImgFilePath() {
        return imgFilePath;
    }

    public void setImgFilePath(String imgFilePath) {
        this.imgFilePath = imgFilePath;
    }

    public String getShareUrl() {
        return shareUrl;
    }

    public String getTitle() {
        if (TextUtils.isEmpty(title)) {
            return "";
        }
        return title;
    }

    public String getDesc() {
        if (TextUtils.isEmpty(desc)) {
            return getTitle();
        }
        return desc;
    }

    public String getImgUrl() {
        if (TextUtils.isEmpty(imgUrl)) {
            return "";
        }
        return imgUrl;
    }

    public void setShareUrl(String shareUrl) {
        this.shareUrl = shareUrl;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }
}
